package com.chinasofti.admin.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.chinasofti.manager.service.AdminPerformanceService;
import com.chinasofti.model.Performance;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

/**
 * Creator: <br>
 * Date: <br>
 * Description: <br>
 */
@Controller
@RequestMapping("/admin/performance")
public class AdminPerformanceController {
    @Reference
    private AdminPerformanceService adminPerformanceService;

    @GetMapping("/list")
    public ModelAndView list(){
        ModelAndView mv = new ModelAndView("performance/list");
        List<Performance> performances = adminPerformanceService.queryPerformanceList();
        mv.addObject("pers", performances);
        return mv;
    }

}
